
#!/bin/bash
BASEDIR=$(dirname "$0")
cd $BASEDIR/..

workPath="../install"

# build type Debug, Release, RelWithDebInfo and MinSizeRel

mkdir build -p
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=${workPath} \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_TOOLCHAIN_FILE=../compiler.92.cmake \
    -DAPP_STATIC_LIB=ON \
    -DBUILD_RAM_INIT=ON

num=$(cat /proc/cpuinfo  | grep process | wc -l)
make -j${num} 
make install